package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.MarketFeedback;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.service.WxFeedBackService;
import com.fasterxml.jackson.databind.ser.Serializers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author gatsby
 * @since 2022/10/15 11:08
 */
@RestController
@RequestMapping("wx/feedback")
public class WxFeedBackController {

    @Autowired
    WxFeedBackService wxFeedBackService;


    /**
     * 意见反馈的业务逻辑
     *
     * @param marketFeedback
     * @return com.cskaoyan.bean.common.BaseRespVo
     * @author gatsby
     * @since 2022/10/15 11:16
     */
    @PostMapping("submit")
    public BaseRespVo submit(@RequestBody MarketFeedback marketFeedback) {
        wxFeedBackService.submit(marketFeedback);
        return BaseRespVo.ok("成功");
    }
}
